#ifndef SINGLETON_H
#define SINGLETON_H
#include<memory>

template<class T>
class Singleton
{
public:
    Singleton() {}


    static T* GetInstance(){
        static T v;
        return &v;
    }
};
 template<class T>
class Singletonptr{
public:
    static std::shared_ptr<T> GetInstance(){
        static std::shared_ptr<T> ptr(new T);
        return ptr;
    }
};

#endif // SINGLETON_H
